import * as i18n from '@ey-utils/utils/i18n';
import { localeInfo } from 'umi';
import { MessageDescriptor } from 'react-intl';
import { DynamicObjectAny } from '@/typings';
export const formatMessage = (desc: MessageDescriptor | string, values?: any) => {
  return i18n.formatMessage(desc, localeInfo, values);
};

export const compileFormatMessage = (
  descriptor: MessageDescriptor | string,
  compileValue: DynamicObjectAny,
  localeInfo?: any,
) => {
  return i18n.compileFormatMessage(descriptor, compileValue, localeInfo);
};
